#ifndef H_EXTERN_20071013
#define H_EXTERN_20071013

#include "types.h"
#include "hashtables.h"
#include "linkedlists.h"

extern ulong port;

#ifdef USE_SSL
extern SSL_CTX* serv_ssl_ctx;
extern SSL *serv_ssl;
extern SSL_METHOD* serv_ssl_meth;
#endif

extern pthread_t th_server;
extern pthread_t th_pinger;
extern pthread_t th_admin;
extern pthread_t th_auther;

extern List* modules_list;
extern List *threads_list;
extern List *auth_list;
extern pthread_mutex_t auth_mutex;

extern SecSockets sockets[];

extern HashTable *clientstb;
extern HashTable *channelstb;
extern HashTable *commandstb;

extern time_t starttime;

extern int ClientsInsertionOrder;
extern pthread_mutex_t clientinsert_mutex;

extern struct sigaction act;
extern struct sigaction actbp;

extern int ServRestartFlag;
extern int ServCloseFlag;

extern int ThreadsCounter;
extern pthread_mutex_t ThreadsCounter_mutex;

extern NetworkConfig NetworkConf;
extern MysqlConfig	  MysqlConf;
extern ServerConfig  ServerConf;

extern DebugFile *dfSys;
extern DebugFile *dfMem;

#endif
